﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ViewModels.CommonVM
{
    public class SearchObjVM
    {
        public int PageIndex
        {
            get
            {
                return _pageIndex == 0 ? 1 : _pageIndex;
            }
            set
            {
                _pageIndex = value;
            }
        }
        private int _pageIndex;

        public int PageSize
        {
            get
            {
                return _pageSize == 0 ? Int32.MaxValue : _pageSize;
            }
            set
            {
                _pageSize = value;
            }
        }
        private int _pageSize;

        public int TotalCount
        {
            get
            {
                return _totalCount == 0 ? Int32.MaxValue : _totalCount;
            }
            set
            {
                _totalCount = value;
            }
        }
        private int _totalCount;

        public int PageCount
        {
            get
            {
                return _pageCount == 0 ? Int32.MaxValue : _pageCount;
            }
            set
            {
                _pageCount = value;
            }
        }
        private int _pageCount;

        public string Parameters
        {
            get
            {
                return _parameters ?? string.Empty;
            }
            set
            {
                _parameters = value;
            }
        }
        private string _parameters;

        //public string SearchText
        //{
        //    get { return _searchText ?? string.Empty; }
        //    set { _searchText = value; }
        //}

        //private string _searchText;
    }
}
